# 月度比赛报名表单
from flask_wtf import FlaskForm
from wtforms import StringField, DateField, TextAreaField, SubmitField, SelectField
from wtforms.validators import DataRequired

class MonthlyCompetitionForm(FlaskForm):
    name = StringField('比赛名称', validators=[DataRequired()])
    description = TextAreaField('比赛描述')
    start_date = DateField('开始日期', validators=[DataRequired()])
    end_date = DateField('结束日期', validators=[DataRequired()])
    submit = SubmitField('创建比赛')

class MonthlyCompetitionSignupForm(FlaskForm):
    group = SelectField('报名组别', choices=[('A', '甲组'), ('B', '乙组'), ('C', '丙组')], validators=[DataRequired()])
    submit = SubmitField('报名参加')
